<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="_{$adminbase}styles/documentation.css" type="text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="MSThemeCompatible" content="no" />
<title>添加路线</title>
<link href="_{$adminbase}styles/common.css" rel="stylesheet" type="text/css" />
	<link href="_{$adminbase}scripts/ckeditor/sample.css" rel="stylesheet" type="text/css"/>


<body>
<div id="main">
<div class="xs_tl"> 
<div class="l"></div>
<div class="r"></div>
<div class="hackbox"></div>
</div>
<div>
</div>
_{if $errmsg!=''}
<div class="info">
_{$errmsg}
</div>
_{/if}
<div class="boxer">
<div id="OP_ListMaster">
<div class="header_1">为每一个邮轮添加专属的航班计划</div>
<div class="line_1"></div>
<form action="admin.php?action=cruise-route-add" method="post">
	<p>出发点:
					<label>
									<select name="start" id="start" onchange="changea(this.value)">
													<option value="Chongqing" selected="selected">重庆</option>
													<option value="Yichang">宜昌</option>
													<option value="Wuhan">武汉</option>
													<option value="Shanghai">上海</option>
									</select>
					</label>
抵达点：
<select name="end" id="end" onchange="changeb(this.value)">
				<option value="Chongqing">重庆</option>
				<option value="Yichang">宜昌</option>
				<option value="Wuhan">武汉</option>
				<option value="Shanghai">上海</option>
</select>(这里我会为你自动选性质的~但别相信我~切记要核对………………)
	</p>
	<p>性质：
					<label>
									<select name="way" id="way">
													<option value="1">上行</option>
													<option value="0">下行</option>
									</select>
					</label>
	</p>
				<input type="submit" value="提交(Submit)" />
		</form>
</div>
</div>
<div class="xs_bl">
<div class="l"></div>
<div class="r"></div>
<div class="hackbox"></div>
</div>
</div>
</body>
</html>
 <!--CFK -->
 <script type="text/javascript" src="_{$adminbase}scripts/ckeditor/ckeditor.js"></script>
<script src="_{$adminbase}scripts/ckeditor/sample.js" type="text/javascript"></script>
<script type="text/javascript">
	
	function $(id){ return document.getElementById(id);}
	var way = $('way');
	var end = $('end');
	var start = $('start');
	function changea(v){
		if(v=='Chongqing'){
			alert('下行');
			way[1].selected=true;
		}
		if(v=='Yichang'){
			if(end.value=='Wuhan' || end.value=='Shanghai'){
				alert('下行');
				way[1].selected=true;
			}else{
				alert('上行');
				way[0].selected=true;	
			}
		}
		if(v=='Wuhan'){
			if(end.value=='Shanghai'){
			alert('下行');
			way[1].selected=true;	
			}else{
				alert('上行');
			way[0].selected=true;	
			}
		}
		if(v=='Shanghai'){
			if(end.value=='Wuhan' || end.value=='Chongqing' || end.value=='Yichang'){
				alert('上行');
				way[0].selected=true;
			}
		}
		if(v==end.value){
			alert('同样的2个城市我没办法做选择');
		}
	}
	function changeb(v){
		if(v=='Shanghai'){
			if(start.value=='Chongqing' || start.value=='Wuhan' || start.value=='Yichang'){
				alert('下行');
				way[1].selected=true;
			}else{
				alert('上行');
				way[0].selected=true;	
			}
		}
		if(v=='Wuhan'){
			if(start.value=='Shanghai'){
				alert('下行');
				way[1].selected=true;	
			}else{
				alert('上行');
				way[0].selected=true;
			}
		}
		if(v=='Yichang'){
			if(start.value=='Chongqing'){
				alert('下行');
				way[1].selected=true;
			}else{
				alert('上行');
				way[0].selected=true;
			}
		}
		if(v=='Chongqing'){
			alert('上行');
			way[0].selected=true;
		}
		if(v==start.value){
			alert('同样的2个城市我没办法做选择');
		}
	}
</script>